package com.twu.biblioteca;

import java.util.Scanner;
import java.io.PrintStream;
import java.io.InputStream;

public class InputAsker {
    private Scanner scanner;
    private PrintStream out;

    public void setScanner(InputStream in) {
        scanner = new Scanner(in);
    }

    public InputAsker() {
        this (System.in, System.out);
    }

    public InputAsker(InputStream in, PrintStream out) {
        scanner = new Scanner(in);
        this.out = out;
    }

    public String ask(String message) {
        out.println(message);
        return scanner.nextLine();
    }
}
